package com.zjf.carpark.service.impl;


import com.zjf.carpark.dao.BaseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BaseServiceImpl<T> implements BaseMapper<T> {

    @Autowired
    BaseMapper<T> baseMapper;
    @Override
    public List<T> selectAll() {
        return baseMapper.selectAll();
    }

    @Override
    public T selectById(Integer id) {
        return baseMapper.selectById(id);
    }

    @Override
    public Integer save(T t) {
        return baseMapper.save(t);
    }

    @Override
    public Integer update(T t) {
        return baseMapper.update(t);
    }

    @Override
    public Integer deleteById(Integer id) {
        return baseMapper.deleteById(id);
    }
}
